package com.mdd.common.core;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 基础类的Entity
 *
 * @author hxh
 * @date 2022/10/7
 */
@Data
public class RxEntity implements Serializable {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private Integer createBy;
    /**
     * 更新人
     */
    @TableField(value = "update_by")
    private Integer updateBy;
    /**
     * 删除标志
     */
    @TableField(value = "is_delete")
    @TableLogic
    private Boolean isDelete;
    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 乐观锁
     */
    @TableField(value = "revision")
    @Version
    private Integer revision;

}
